﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="PageWithAccordion.aspx.cs" Inherits="PageWithAccordion" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeaderContentPlaceHoder" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="Server">
    <cc1:Accordion ID="Accordion1" AutoSize="Fill" BackColor="Blue" BorderStyle="Solid"
        SelectedIndex="0" FadeTransitions="true" runat="server">
        <Panes>
            <cc1:AccordionPane ID="NewsPane" runat="server">
                <Header>
                    <asp:Image ImageUrl="~/images/NEwsIcon.png" runat="server" ID="Image1" />
                    <asp:Label runat="server" ID="NewsLabel" Text="News"></asp:Label>
                </Header>
                <Content>
                    <asp:ListView ID="GoogleNewsListView" runat="server" ItemPlaceholderID="itemPlaceHolder"
                        OnItemDataBound="GoogleNewsListView_ItemDataBound" OnDataBound="GoogleNewsListView_DataBound"
                        OnItemCreated="GoogleNewsListView_ItemCreated">
                        <LayoutTemplate>
                            <h1>
                                <asp:Label ID="GoogleNewsTitleLabel" runat="server" Text="Latest News"></asp:Label></h1>
                            <ul class="browselist">
                                <li id="itemPlaceHolder" runat="server"></li>
                            </ul>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <li>
                                <h3>
                                    <a rel="nofollow" target="_blank" href="<%# XPath("link") %>">
                                        <%# XPath("title")%></a>
                                </h3>
                                <asp:Label ID="AdsenseInlineLabel" Text="" Visible="false" runat="server"></asp:Label>
                                <%# XPath("description")%>
                            </li>
                        </ItemTemplate>
                    </asp:ListView>
                    <asp:XmlDataSource ID="GoogleNewsDataSource" XPath="/rss/channel/item[position()<7]"
                        runat="server"></asp:XmlDataSource>
                </Content>
            </cc1:AccordionPane>
            <cc1:AccordionPane ID="BlogsPane" runat="server">
                <Header>
                    <asp:Image ImageUrl="~/images/BlogIcon.png" runat="server" ID="Image2" />
                    <asp:Label runat="server" ID="BlogLable" Text="Blogs"></asp:Label>
                </Header>
                <Content>
                    <asp:ListView ID="BlogSearchListView" runat="server" ItemPlaceholderID="itemPlaceHolder">
                        <LayoutTemplate>
                            <h1>
                                <asp:Label ID="BlogSearchTitleLabel" runat="server" Text="Results From BlogSearch"></asp:Label></h1>
                            <ul class="browselist">
                                <li id="itemPlaceHolder" runat="server"></li>
                            </ul>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <li>
                                <p>
                                    <a rel="nofollow" target="_blank" href="<%# XPath("link") %>">
                                        <%# XPath("title")%></a>
                                </p>
                                <p>
                                    <%# XPath("description")%>
                                </p>
                            </li>
                        </ItemTemplate>
                    </asp:ListView>
                    <asp:XmlDataSource ID="BlogSearchDataSource" XPath="/rss/channel/item[position()<7]"
                        runat="server"></asp:XmlDataSource>
                </Content>
            </cc1:AccordionPane>
        </Panes>
    </cc1:Accordion>
</asp:Content>
